package com.own.component.common.base;

import com.own.base.BaseResponseCode;
import com.own.component.common.em.BusinessEnum;
import lombok.AllArgsConstructor;

/**
 * BusinessErrorResponseCode
 *
 * @author chenxueli
 * @date 2023-10-18 11:34:00
 */
@AllArgsConstructor
public class BusinessErrorResponseCode implements BaseResponseCode {

    /**
     * 返回code
     */
    private String code;

    /**
     * 返回描述
     */
    private String desc;

    public BusinessErrorResponseCode(String desc) {
        this.code = BusinessEnum.DEFAULT.code();
        this.desc = desc;
    }

    /**
     * 获取返回信息
     *
     * @return 返回code
     */
    @Override
    public String code() {
        return this.code;
    }

    /**
     * 获取描述
     *
     * @return 返回描述
     */
    @Override
    public String desc() {
        return this.desc;
    }

}
